package openadmin.controller.gwt.beaninfo;

import java.io.Serializable;

import openadmin.controller.gwt.form.ParameterField;
import openadmin.dao.annotations.common.LabelFormatType;


/**
 * <desc> ClassInfo: We should provide most of the information from a class that reflection supplies, 
 *        as in the client, we cannot use reflection 
 * 
 * In order to simplify programming, all the attributes have been declared "public"
 * @author edu
 *
 */
public class ClassInfo implements Serializable{
	
	private static final long serialVersionUID = 1L; // To avoid complier warnings
	
	public String classDescription;			// i18n description of the class
	public String className;				// class name
	
	public FieldInfo[] fields;				// all the fields in the table
	public ClassInfo[] classInfo;			// if a field(attribute) is a class, it should have this information too
	
		
	public DetailChoice[] details;			// collection, sets etc (that depends on this class)  to be shown separately in another form
	public ActionChoice[] actions;			// the actions a user can execute from the model
	public CollectionInfo[] collection; 	// Collections attached to a class to be shown usually on the same form
	public DependsOn[] dependsOn;			// Responses to on-change event of a field
	
	public LabelFormatType labelFormat;		// Label format in form view 			
	
											// You should take care that a class can have many views defined, but we can only choose 
											// one tabular view and one and only one fullView
	
	public String tabView;					// tabular view definition (attributes separated by commas)
	public String fullView;					// full view definition (With OpenXava grammar)
	
	public String[] tabViewFieldNames;		// Name of the fields that are used in the tab view. If a field is from another class
											// it should be named as class.attribute
	
	public String[] fullViewFieldNames;		// Name of the fields that are used in the full view. If a field is from another class
											// it should be named as class.attribute
									
	
	public RowStyleInfo[] rowStyle;			// Definition of row style in a CSS in a tabular view  
	
	public String parentClassDescription;	// i18n description of the parent class
	public String parentClassName;			// parent class name
	
	public ParameterField[] paramFields;	// Additional fields in the main form used while executing options so that you should not prompt another form to show them.
	
	
}
